package com.platform;

import cn.hutool.core.util.StrUtil;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class AppStartUp {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(AppStartUp.class, args);
        String active = context.getEnvironment().getProperty("spring.profiles.active");
        String port = context.getEnvironment().getProperty("server.port");
        System.out.println(StrUtil.format("启动成功：[环境: {}]-[端口: {}]", active, port));
    }

}
